const defaultOptions={del:'del',set:'set'}
class MergeOptions{
    constructor(options){
        let mergeOptions={...options,...defaultOptions}
        Object.keys({...options,...defaultOptions}).forEach(key=>{
            this[key]=mergeOptions[key]
        })
        // this.options={
        //     ...defaultOptions,
        //     ...options
        // }
    }
    abc(){
        
    }
}
MergeOptions.prototype.abc=function(){return 'abc'}
console.log(new MergeOptions({http2:'http2'}).abc);
